import { ElMessageBox } from "element-plus";

export const handleConfirm = (cbArg: any, msg: string, cb: (any) => void) => {
  ElMessageBox.confirm(`确定要${msg}吗？`, "提示", {
    confirmButtonText: "确定",
    cancelButtonText: "取消",
    type: "warning"
  })
    .then(() => {
      cb(cbArg);
    })
    .catch(() => {});
};
